<template>
    <div class="goods">
            <div class="goods-box" v-for="(v,index) in  goodsArr" :key="index">
                <img :src="v.src">
                <div class="bottom">
                    <p>
                        {{v.title}}
                    </p>
                    <p>¥
                        <span>{{v.price}}</span>
                    </p>
                    <p>
                        <span>自营</span>
                        <span>看相似</span>
                    </p>
                </div>
            </div>
            
        </div>
</template>

<script>
export default {
    data(){
        return{
            goodsArr:[
                {
                    src:'//img10.360buyimg.com/mobilecms/s360x360_jfs/t1/51329/32/22511/151135/63bfa8a6Fe1969202/13993711910e1624.jpg!q70.dpg.webp',
                    title:'苏泊尔（SUPOR）多功能锅电火锅分体式料理锅火锅专用锅涮烤一体电蒸锅火锅锅具不粘电炒锅家用烤肉锅 【苏泊尔】',
                    price:'509.00'
                },
                {
                    src:'//img10.360buyimg.com/mobilecms/s360x360_jfs/t1/216416/30/22515/133421/63c0c94dF1a69555b/3f2eaaf187c94962.jpg!q70.dpg.webp',
                    title:'富光保温杯304不锈钢茶杯真空商务杯壶男女士学生大容量直身水杯子',
                    price:'59.90'
                },
                {
                    src:'//img10.360buyimg.com/mobilecms/s360x360_jfs/t1/33544/5/18394/163163/63a3b69eE5ed8f542/5c6465de9fe39aa7.jpg!q70.dpg.webp',
                    title:'养元六个核桃精品型兔年贺岁款240ml*16罐饮料整箱礼盒装',
                    price:'69.90'
                },
                {
                    src:'//img10.360buyimg.com/mobilecms/s360x360_jfs/t1/39000/39/20787/134261/639be1b2E691553eb/6e0763ac2a37ee21.jpg!q70.dpg.webp',
                    title:'美的冰箱325升一级能效双变频超薄多门法式四门双开门电冰箱家用风冷无霜净味保鲜智能冰箱对开门大容量 BCD-325WFPM(E)',
                    price:'2899.00'
                },
            ]
        }
    }
}
</script>
<style>
    .goods {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        }
        .goods .goods-box {
        width: 46.13333333vw;
        height: 74.13333333vw;
        background-color: #fff;
        border-radius: 15px;
        margin-bottom: 2.66666667vw;
        }
        .goods .goods-box img {
        width: 46.13333333vw;
        border-top-left-radius: 15px;
        border-top-right-radius: 15px;
        }
        .goods .goods-box .bottom {
        padding: 0 2.4vw;
        box-sizing: border-box;
        }
        .goods .goods-box .bottom p:first-child {
        font-size: 3.46666667vw;
        line-height: 4.66666667vw;
        height: 9.33333333vw;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-align: left;
        }
        .goods .goods-box .bottom p:nth-child(2) {
        color: #ed3933;
        font-size: 2.93333333vw;
        line-height: 7.46666667vw;
        text-align: left;
        }
        .goods .goods-box .bottom p:nth-child(2) span {
        font-size: 4vw;
        }
        .goods .goods-box .bottom p:last-child {
        display: flex;
        justify-content: space-between;
        align-items: center;
        }
        .goods .goods-box .bottom p:last-child span:first-child {
        width: 6.66666667vw;
        height: 4vw;
        line-height: 4vw;
        background: #ed3933;
        color: #fff;
        font-size: 2.66666667vw;
        border-radius: 4px;
        }
        .goods .goods-box .bottom p:last-child span:last-child {
        width: 13.33333333vw;
        height: 5.06666667vw;
        line-height: 5.06666667vw;
        background: #f2f2f2;
        font-size: 3.2vw;
        border-radius: 8px;
        text-align: center;
        }
</style>